package edu.gduf.decortor;

/**
 * Created by Zhang DaoChuan on 2017/2/18.
 */
public class Main {
    public static void main(String[] args) {
//        绿头鸭
        Duck mallardDuck = new MallardDuck();
        mallardDuck.performQuack();
        mallardDuck.performFly();
        mallardDuck.performSwim();
        System.out.println("--------------------------------");
//        橡皮鸭
        Duck rubberDuck = new RubberDuck();
        rubberDuck.performQuack();
        rubberDuck.performFly();
        mallardDuck.performSwim();
        System.out.println("--------------------------------");
//         木头鸭
        Duck decoyDuck = new DecoyDuck();
        decoyDuck.performQuack();
        decoyDuck.performFly();
        mallardDuck.performSwim();
        System.out.println("--------------------------------");
//         鸭叫器
        DuckCall call = new DuckCall(new Quack());
        call.performQuack();
    }
}
